package com.traceability.controller;

import com.traceability.vo.NodeVO;
import com.traceability.service.impl.NodeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/node")
public class NodeController {

    @Autowired
    private NodeServiceImpl nodeService;

    @PutMapping("/{tenant_id}/create")
    public String eventCreate(@PathVariable("tenant_id") String tenantId,
                              @RequestBody NodeVO nodeVO) {
        return nodeService.eventCreate(tenantId, nodeVO);
    }


    @PutMapping("/{tenant_id}/update")
    public String eventUpdate(@PathVariable("tenant_id") String tenantId,
                              @RequestBody NodeVO nodeVO) {
        return nodeService.eventUpdate(tenantId, nodeVO);
    }

}
